
using System;
using System.Drawing;

using MonoTouch.Foundation;
using MonoTouch.UIKit;

namespace bjeschool
{
	public partial class ClassNoteStat : UIViewController
	{
		[Outlet("image1")]
		private UIImageView image1 { get; set; }

		[Outlet("image2")]
		private UIImageView image2 { get; set; }
		
		[Outlet("image3")]
		private UIImageView image3 { get; set; }
		
		[Outlet("image4")]
		private UIImageView image4 { get; set; }

		private UIImageView currentImage;
		[Action("OnClick:")]
		public void OnClick (UIButton sender)
		{
			if (currentImage != null)
				currentImage.Hidden = true;
			switch (sender.Tag) {
			case 1:
				image1.Hidden = false;
				currentImage = image1;
				break;
			case 2:
				image2.Hidden = false;
				currentImage = image2;
				break;
			case 3:
				image3.Hidden = false;
				currentImage = image3;
				break;
			case 4:
				image4.Hidden = false;
				currentImage = image4;
				break;
			}
		}

		public ClassNoteStat () : base ("ClassNoteStat", null)
		{
		}
		
		public override void DidReceiveMemoryWarning ()
		{
			// Releases the view if it doesn't have a superview.
			base.DidReceiveMemoryWarning ();
			
			// Release any cached data, images, etc that aren't in use.
		}
		
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			currentImage = image1;
			// Perform any additional setup after loading the view, typically from a nib.
		}
		
		public override void ViewDidUnload ()
		{
			base.ViewDidUnload ();
			
			// Clear any references to subviews of the main view in order to
			// allow the Garbage Collector to collect them sooner.
			//
			// e.g. myOutlet.Dispose (); myOutlet = null;
			
			ReleaseDesignerOutlets ();
		}
		
		public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
		{
			// Return true for supported orientations
			return true;
		}
	}
}

